Skip to content

Restore compare flow and add startDate ≤ endDate validation#57

Merged
lukepring merged 4 commits intoSprint-2-Jackfrom
copilot/sub-pr-55-again
Mar 20, 2026
Merged

Restore compare flow and add startDate ≤ endDate validation#57
lukepring merged 4 commits intoSprint-2-Jackfrom
copilot/sub-pr-55-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

Previously, /compare would accept an invalid date range and proceed to the API, yielding empty data and a misleading error. After a merge regression it also stopped using the base branch compare flow. This update restores the intended comparison call and adds a clear date-range check.

Changes

  • Restore compare flow — controller now uses priceController.comparePrices (base branch behavior) and handles empty results as before.
  • Date range validation — early-return check after date parsing to require startend, surfacing a clear error message and avoiding unnecessary API calls.

Testing

  • ./mvnw test

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: lukepring <68820847+lukepring@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback from review on Sprint 2 jack PR Add startDate ≤ endDate validation to /compare endpoint Mar 20, 2026
Copilot AI requested a review from lukepring March 20, 2026 15:49
@lukepring lukepring marked this pull request as ready for review March 20, 2026 16:12
@lukepring
Copy link
Copy Markdown
Owner

@copilot Ensure merge conflict was fixed correctly and this pull request works pls

Co-authored-by: lukepring <68820847+lukepring@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 20, 2026

@copilot Ensure merge conflict was fixed correctly and this pull request works pls

Fixed the merge regression in WebPageController while keeping the start<=end validation (commit 577066d). The controller now calls priceController.comparePrices again and handles empty data/error paths correctly. Local check: ./mvnw test passes. No UI changes required for this fix.

Copilot AI changed the title Add startDate ≤ endDate validation to /compare endpoint Restore compare flow and add startDate ≤ endDate validation Mar 20, 2026
@lukepring lukepring merged commit 6356ee2 into Sprint-2-Jack Mar 20, 2026
@lukepring lukepring deleted the copilot/sub-pr-55-again branch March 20, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants